package com.qingcheng.dao;

import com.qingcheng.pojo.system.Resource;
import com.qingcheng.pojo.system.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface RoleMapper extends Mapper<Role> {
    @Select("SELECT id,`name` AS name FROM `tb_role` WHERE id IN (SELECT `role_id` AS id FROM `tb_admin_role` WHERE `admin_id`= #{id})")
    List<Role> findByAdminId(@Param("id") Integer id);
}
